<?php
class Home extends MY_Controller{
	
     public function index(){
     	/* $index=$this->uri->segment(3);
     	$segs = $this->uri->segment_array();
     	$this->load->library('pagination');       //导入分页类
     	$config['base_url'] = base_url().'/home/index/'; //导入分页类URL
     	$config['total_rows'] = $this->db->count_all('user_plan');  //计算总记录数
     	$config['per_page'] = '10';         //每页显示的记录数
     	$config['full_tag_open'] = '<p>';
     	$config['full_tag_close'] = '</p>';
     	$this->pagination->initialize($config);      //初始化分类页
     	if($index==null){
     		$data['results']=$this->get_plan($config['per_page'],10);
     	}else{
     		$data['results']=$this->get_plan($index,10);
     	}   */
     	echo $_SERVER['REQUEST_METHOD'];
     	$this->set_title();
		$this->load->view('include/header');
        $this->load->view('body/home');
 }
    private function get_carts(){
    	$carts=get_carts();
    }
 	private function set_title(){
 		set_title('Home');
 	}
 	private function add_css($filename=''){
 		add_css($filename);
 	}
 	private function add_js($filename=''){
 		add_js($filename);
 	}
 	private function get_plan($num,$offset){
 		$query=$this->db->query('select userId,treasurerScore,serachDate from user_plan limit '.$num.' , '.$offset);
 		return $this->query_result_to_array($query);
 	} 
 
}
